package com.yykj.tencent.im.server.controller;

import com.yykj.tencent.im.client.form.TpnsSendForm;
import com.yykj.tencent.im.server.service.TpnsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@Api(tags = "移动推送 TPNS")
@RequestMapping("api/tencent/tpns")
public class TpnsController {
    @Autowired
    TpnsService tpnsService;

    @ApiOperation("群发发送自定义消息")
    @PostMapping("/send")
    public void send(@RequestBody TpnsSendForm tpnsSendForm) {
        tpnsService.pushApp(tpnsSendForm);
    }

}
